import shutil 
import os

num = 0
for file in os.listdir(path='/home/unionsys/Pictures/1801/images/train'):
    if num%8==1:
        shutil.move('/home/unionsys/Pictures/1801/images/train/'+file,'/home/unionsys/Pictures/1801/images/val/'+file)
    num = num + 1